The present invention relates generally to a method for an operating system to reclaim or recover a subset of the resources of an address space in the case where the resources cannot be removed while the address space is active and more particularly to a more efficient method for an operating system to recover fixed real storage from a swappable address space.
As used herein, the term xe2x80x98framexe2x80x99 is meant to refer to a block of information, wherein the block of information may be the smallest allocatable unit of real storage.
As used herein, the term xe2x80x98fixed framexe2x80x99 refers to a frame that cannot be taken or relocated except through the swap process.
As used herein, the term xe2x80x98fixed pagexe2x80x99 refers to a virtual page backed by a fixed frame.
As used herein, the term xe2x80x98secondary storagexe2x80x99 refers to a location of a page when not residing in real memory.
As used herein, the term xe2x80x98frame table elementxe2x80x99 or xe2x80x98frame elementxe2x80x99 refers to the data structure representing a real frame, wherein each real frame has a frame table element.
Typically, in operating systems that support multiple virtual address spaces and that have the ability to fix certain blocks of information, or frames, in an address space in real memory for future use, the operating system is sometimes required to move fixed frames to an alternate memory location, such as a secondary memory or an expanded memory. This technique is called swapping and allows the operating system to reclaim a subset of the resource of the address space and use that subset for more immediate operations. The real memory for a page is allocated and the dynamic address translation tables for that page are updated using a process called xe2x80x98backingxe2x80x99, which indicates the real memory associated with that page.
Referring to FIG. 1, an operating system 300 is shown having multiple address spaces. Normally, each address space 302 contains a Region Control Task (RCT) 304 which controls various functions in the address space 302, including the swapping process. In addition, each operating system includes a Real Storage Manager (RSM) 306 and a Systems Resource Manager (SRM) 308 which coordinate actions between the RCT 304 and any programs or applications 310 that are active. As an example, when stored information needs to be recovered from an address space 302, the RSM 306 notifies the SRM 308 and the SRM 308 coordinates this action by communicating with the RCT 304 of the address space 302. As another example, when a swappable address space 302 is to become non-swappable, the application 310 that initiates this action notifies the SRM 308 and the SRM 308 coordinates this by communicating with the RCT 304 and requesting that a swappable address space 302 become non-swappable.
In an operating system, real memory is categorized into preferred and non-preferred memory. Non-preferred memory is memory that can be made available on demand and preferred memory is memory that may hold long term fixed pages and that cannot be made available on demand. Swappable address spaces can fix pages in the preferred or non-preferred area of real memory and non-swappable address spaces can fix pages in the preferred area of real memory. Because non-preferred memory must be made available on demand the operating system must be able to recover (i.e. retrieve memory from an application using the memory) non-preferred memory when needed for more immediate operations. Typically, non-preferred memory must be recovered because the storage is to be configured offline or the address space owning the non-preferred memory is becoming long term non-swappable and hence all of its fixed frames must become preferred. Using current swapping methods, two processes, REQSWAP and TRANSWAP, are usually employed. The REQSWAP process is utilized for recovering fixed non-preferred memory from a swappable address space and the TRANSWAP process is utilized in systems which support the capability for the conversion of a swappable address space into non-swappable address space. Both the REQSWAP process and the TRANSWAP process facilitate the swapping action and are discussed in more detail below.
Referring to FIG. 2, the existing method for recovering swappable fixed non-preferred memory using the REQSWAP process is illustrated. If the operating system needs to configure a specific area of real memory, then the operating system sends a request to the Real Storage Manager (RSM) to configure an area of real memory offline as in step 100. The RSM receives this request and determines which area of real memory will be configured as in step 102. The RSM then indicates that this area of real memory has been xe2x80x98interceptedxe2x80x99 or xe2x80x98flaggedxe2x80x99 to go offline as in step 104. The RSM then determines if there are any fixed pages belonging to swappable address spaces contained within the range of real storage as in step 106. If so, the operating system then swaps the entire address space to a secondary, or auxiliary storage, then back into real memory as in step 108. This process of swapping the address space to an auxiliary storage will free the memory, thus allowing the xe2x80x98flaggedxe2x80x99 frames to be available and thus configured offline.
One problem with this process is that every address space that contains fixed intercepted frames is swapped into a secondary memory storage or an external memory storage area which requires the need to perform Input/Output (I/O) operations. These I/O operations can be expensive in both time and cost.
Referring to FIG. 3, the existing method for recovering swappable fixed non-preferred memory where the originally swappable address space has been converted into non-swappable address space using the TRANSWAP process is illustrated. The operating system sends a request to the RSM to convert the address space with intercepted frames to non-swappable address space as in step 200. The operating system then swaps the entire address space to a secondary or auxiliary memory storage area as in step 202. The SRM will then send a request to the RSM to swap in the address space as in step 204. In swapping the address space back into real memory, the operating system will detect that the address space is now non-swappable and will allocate preferred memory for all fixed pages with the address space as in step 206. The entire address space is swapped which is a time consuming and expensive process.
Currently, the only method for recovering fixed non-preferred frames is to swap the entire owning address space to secondary storage. However, two problems exist with these methods. First, in an operating system that doesn""t support expanded storage (such as an electronic volatile storage comparable to real storage), all swapped non-preferred memory is required to be relocated to a secondary or auxiliary memory location. This is undesirable because a swap out to a secondary or auxiliary storage location is much more expensive than a swap out to an expanded storage location. Second, all of the frames in the address space must be processed in order to perform the swap even though only a subset of the frames actually need to be replaced. In effect, the way the REQSWAP and TRANSWAP processes perform their tasks is inherently costly and inefficient. Thus, it is desirable to provide a method which is capable of performing the tasks of REQSWAP and TRANSWAP, yet that is more efficient and less expensive to implement.
Therefore, the need remains for a method of recovering fixed non-preferred memory whereby the method is more efficient and less expensive to implement than current swapping methods.
In a computing system having swappable and non-swappable address spaces, wherein the computing system includes an operating system that includes a Real Storage Manager (RSM), a Systems Resource Manager (SRM) and a Region Control Task (RCT), a method for recovering swappable fixed non-preferred memory comprising: receiving a request from the operating system to configure an area of real memory to create an intercepted swappable address space, wherein the intercepted swappable address space includes a flagged fixed frame element identified for configuration; examining the intercepted swappable address space so as to determine if the intercepted swappable address space will remain swappable; requesting the SRM to coordinate the swapping process; quiescing the intercepted address space; generating a first return code responsive to the intercepted swappable address space remaining swappable; communicating the first return code to the RCT so as to cause the RCT to respond to the first return code; instructing the RSM to proceed based on the first return code; examining the intercepted swappable address space so as to identify the flagged-frame elements; exchanging the flagged frame elements with unflagged frame elements; updating dynamic address translation tables; and returning a performance code to the RCT so as to indicate recovery success or recovery failure.
In a computing system having swappable and non-swappable address space, wherein the computing system includes an operating system that includes a Real Storage Manager (RSM), a Systems Resource Manager (SRM) and a Region Control Task (RCT) and wherein the SRM has been requested to coordinate swapping an address space having a non-preferred frame backing a fixed page, a method for recovering swappable fixed non-preferred memory where the originally swappable address space has been converted into non-swappable address space comprising: quiescing the address space; generating a second return code responsive to the address space being converted into the non-swappable address space; communicating the second return code to the RCT so as to cause the RCT to respond to the second return code; instructing the RSM to proceed based on the second return code; examining the address space so as to identify the non-preferred frame backing the fixed page; exchanging the non-preferred frame backing the fixed page with a new frame; updating dynamic address translation tables; and returning a performance code to the RCT so as to indicate recovery success or recovery failure.